import { ApiProperty } from '@nestjs/swagger';
import { Column, Entity } from 'typeorm';
import { BaseEntity } from '../../../base.entity';

@Entity({ name: 'base_material' })
export default class BaseMaterial extends BaseEntity {
  @Column({ type: 'varchar', length: 50, name: 'material_code', comment: '产品编码' })
  @ApiProperty()
  materialCode: string;

  @Column({ type: 'varchar', length: 50, name: 'material_name', comment: '产品名称' })
  @ApiProperty()
  materialName: string;

  @Column({
    type: 'varchar',
    length: 50,
    name: 'out_mode_code',
    nullable: true,
    comment: '出条方式编码',
  })
  @ApiProperty()
  outModeCode: string;

  @Column({
    type: 'varchar',
    length: 50,
    name: 'out_mode_name',
    nullable: true,
    comment: '出条方式',
  })
  @ApiProperty()
  outModeName: string;

  @Column({ type: 'varchar', nullable: true, comment: '版本' })
  @ApiProperty()
  version: string;

  @Column({ type: 'varchar', nullable: true, name: 'custom_code', comment: '客户编码' })
  @ApiProperty()
  customCode: string;

  @Column({ type: 'varchar', nullable: true, comment: '客户简称', name: 'custom_short' })
  @ApiProperty()
  customShort: string;

  @Column({ type: 'varchar', nullable: true, comment: '客户名称', name: 'custom_name' })
  @ApiProperty()
  customName: string;

  @Column({ type: 'varchar', nullable: true, name: 'customer_no', comment: '货号' })
  @ApiProperty()
  customerNo: string;

  @Column({ type: 'float', nullable: true, name: 'paper_thickness', comment: '纸厚' })
  @ApiProperty()
  paperThickness: number;

  @Column({ type: 'varchar', nullable: true, name: 'corrugated_type_name', comment: '楞别' })
  @ApiProperty()
  corrugatedTypeName: string;

  @Column({ type: 'varchar', nullable: true, name: 'corrugated_type_code', comment: '楞别编码' })
  @ApiProperty()
  corrugatedTypeCode: string;

  @Column({ type: 'varchar', nullable: true, name: 'carton_type_name', comment: '箱型' })
  @ApiProperty()
  cartonTypeName: string;

  @Column({ type: 'varchar', nullable: true, name: 'carton_type_code', comment: '箱型编码' })
  @ApiProperty()
  cartonTypeCode: string;

  @Column({ type: 'float', name: 'material_length', comment: '产品长' })
  @ApiProperty()
  materialLength: number;

  @Column({ type: 'float', name: 'material_width', comment: '产品宽' })
  @ApiProperty()
  materialWidth: number;

  @Column({ type: 'float', name: 'material_height', comment: '产品高' })
  @ApiProperty()
  materialHeight: number;

  @Column({ type: 'float', name: 'paper_length', comment: '纸板长' })
  @ApiProperty()
  paperLength: number;

  @Column({ type: 'float', name: 'paper_width', comment: '纸板宽' })
  @ApiProperty()
  paperWidth: number;

  @Column({ type: 'float', name: 'template_num', nullable: true, comment: '模数' })
  @ApiProperty()
  templateNum: number;

  @Column({ type: 'float', nullable: true, comment: '钉口' })
  @ApiProperty()
  nail: number;

  @Column({ type: 'float', name: 'pile_num', nullable: true, comment: '堆叠数' })
  @ApiProperty()
  pileNum: number;

  @Column({ type: 'float', nullable: true, comment: '摇盖' })
  @ApiProperty()
  lid: number;

  @Column({ type: 'varchar', name: 'material_picture', nullable: true, comment: '印刷稿图' })
  @ApiProperty()
  materialPicture: string;

  @Column({ type: 'varchar', nullable: true, comment: '备注' })
  @ApiProperty()
  remark: string;

  @Column({ type: 'float', name: 'material_price', nullable: true, comment: '产品单价' })
  @ApiProperty()
  materialPrice: number;

  @Column({ type: 'float', name: 'paper_price', nullable: true, comment: '纸板单价' })
  @ApiProperty()
  paperPrice: number;

  // @Column({ type: 'float', name: 'perfect_press', nullable: true, comment: '双面印刷' })
  // @ApiProperty()
  // perfectPress: number;
}
